The present invention generally relates to a numerical control machine tool apparatus and, more particularly, to a method of and an apparatus for retracting a tool of such a machine tool apparatus when an abnormal condition in the automatic machining operation of the machine tool is detected.
Various methods have been proposed for retracting a numerical control (referred to as "NC" hereinafter) machine tool. Such methods include a method in which the tool is manually retracted, a method in which the tool is automatically retracted in a predetermined direction, a method in which the tool is automatically retracted in a direction which is determined by the path of the tool from the start till the end of the machining stored in a memory, and a method in which the tool is automatically retracted in accordance with instructions concerning the direction of machining such as end-surface cutting, turning or the like.
FIG. 1 is a block diagram of a tool retracting apparatus which carries out the above-mentioned method for automatically retracting a tool in a predetermined direction. Any abnormal conditions occuring during automatic machining is detected by a machining abnormality detecting section 1, which then delivers a machining abnormality signal SA to a retraction operation controlling section 2. The retraction operation controlling section 2 reads a retraction parameter SB stored beforehand in a retraction parameter registering section 3 and also reads a tool moving direction SC at the moment of occurrence of the abnormal condition from an NC apparatus 4. The retraction operation controlling section 2 then produces a tool retraction command SD in accordance with the read data. This tool retraction command SD is input to the NC apparatus 4 so that the latter reads, from an output from a position detector 5, the current position SE representing the position of the tool at the moment of occurrence of the abnormal conditions, thereby effecting retraction of the tool.
This operation will be described with reference to the flow chart shown in FIG. 2. In Steps S1 and S2, the machining abnormality detecting section 1 monitors the state of machining, i.e., whether any abnormal condition has taking place, after the start of the maching. When the machining is completed without the occurence of an abnormal conditions, the entire routine is ceased. However, when the machining abnormality detecting section 1 detects the occurence of an abnormal conditions in the Step S2, it delivers the machining abnormality signal to the retraction operation controlling section 2. Upon receipt of this signal, the retraction operation controlling section 2 reads, in accordance with the received signal, a tool retraction relative position (.DELTA.X, .DELTA.Z) and retraction path as retraction parameters from the retraction parameter registering section 3. At the same time, the retraction operation controlling section 2 reads the direction of movement of the tool at the moment of occurrence of the abnormal conditions from the memory of the NC apparatus 4, and generates and delivers a tool retraction command to the NC apparatus 4. These operations are conducted in Step S3. In Step S4, the NC apparatus 4 reads the position (X, Z) of the tool at the moment of occurrence of abnormality from the output of the position detector 5 and effects the retraction of the tool in accordance with the current position (X, Z) of the tool and the tool retraction command given by the retraction operation controlling section 2.
For instance, when the tool retraction command is given such as to retract the tool from a position A to a position C via a position C, the tool retracting operation is conducted in two steps 1 and 2 as follows:
1 A(X, Z).fwdarw.B(X-pX.sub.f, Z-pZ.sub.f) PA1 2 B(X-pX.sub.f, Z-pZ.sub.f).fwdarw.C (X+.DELTA.X, Z+.DELTA.Z)
where, p is a value greater than 0, while (X.sub.f, Z.sub.f) represents the vector of movement of the tool.
After the tool has been retracted, a suitable countermeasure, such as replacement of the tool, is conducted by a manual operation or an interrupting program and then the machining program is restarted in the Step S5 and the process returns to the Step S1 to repeat the described operation.
The manual tool retracting method mentioned above relies upon a manual labor of the operator for retracting the tool. This method, therefore, cannot enable the machine tool to recover promptly, and has a high risk of interference between the tool and the work. In another known method in which the tool is automatically retracted in a predetermined direction, if the retracting direction is given as from the position A to the position B and then to the position C as shown in FIG. 3, there is a risk that the tool will interfere with the work during retraction from the position B to the position C when the tool has been used for machining out an end surface of the work as shown in FIG. 4. This method, therefore, cannot be adopted when the machining program includes both the turning and the end surface machining of the tool. The known method in which the tool retracting direction is determined from the path of the tool is impractical in that a storage means of a large capacity is required to store the tool path from the beginning to the end of the machining, with the result being that the cost of the apparatus is raised. Finally, the method in which the tool is automatically retracted in a retracting direction determined on the bass of the machining direction designated in the machining program requires troublesome efforts of modifying the machining program and tends to cause problems due to mis-programming.